home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
browser
/
converttojpeg.browse
< prev
next >
Wrap
Text File
|
2004-08-03
|
846b
|
42 lines
/*
* ImageFX Browser Script
*
* All browser scripts are called as follows:
*
* ScriptName.browse <numfiles> <filelist>
*
* Where:
*
* <numfiles> = Number of files selected (could be 0).
* <filelist> = File containing the list of files selected,
* one file per line, with full pathname.
*
* ConvertToJPEG.browse:
*
* Convert selected files to JPEG.
*
*/
OPTIONS RESULTS
PARSE ARG numfiles filelist .
IF numfiles > 0 THEN DO
IF OPEN(infile, filelist, 'Read') THEN DO
DO WHILE ~EOF(infile)
curfile = READLN(infile)
IF curfile ~= "" THEN DO
LoadBuffer '"'curfile'"' FORCE
IF rc = 0 THEN SaveBufferAs JPEG '"'curfile'.JPG"' QUALITY 90
END
END
CALL CLOSE(infile)
KillBuffer FORCE
END
EXIT 0